package org.linlinjava.litemall.admin.vo.shop;

import org.linlinjava.litemall.db.domain.AgedmallCollectionPoints;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author wj
 * @date 2022/1/5 14:22
 */
public class ModifyCollectionPointsVo {

    private Integer id;

    private String name;

    private String concat;

    private String phone;

    private Long provinceId;

    private String provinceName;

    @NotNull(message = "市不能为空")
    private Long cityId;

    private String cityName;
    @NotNull(message = "区不能为空")
    private Long areaId;

    private String areaName;

    @NotEmpty(message = "详细地址不能为空")
    private String detailAddress;

    @NotNull(message = "经度不能为空")
    private BigDecimal lng;

    @NotNull(message = "纬度不能为空")
    private BigDecimal lat;

    private String remark;

    private Integer doorRecovery;

    private BigDecimal supportDistance;

    private Integer shopId;


    public static AgedmallCollectionPoints initCollectionPoints(ModifyCollectionPointsVo pointsVo) {
        AgedmallCollectionPoints collectionPoints=new AgedmallCollectionPoints();
        collectionPoints.setId(pointsVo.getId());
        collectionPoints.setName(pointsVo.getName());
        collectionPoints.setContact(pointsVo.getConcat());
        collectionPoints.setPhone(pointsVo.getPhone());
        collectionPoints.setProvinceId(pointsVo.getProvinceId());
        collectionPoints.setProvinceName(pointsVo.getProvinceName());
        collectionPoints.setCityId(pointsVo.getCityId());
        collectionPoints.setCityName(pointsVo.getCityName());
        collectionPoints.setAreaId(pointsVo.getAreaId());
        collectionPoints.setAreaName(pointsVo.getAreaName());
        collectionPoints.setAddressDetail(pointsVo.getDetailAddress());
        collectionPoints.setRemark(pointsVo.getRemark());
        collectionPoints.setLng(pointsVo.getLng());
        collectionPoints.setLat(pointsVo.getLat());
        collectionPoints.setDoorRecovery(pointsVo.getDoorRecovery());
        collectionPoints.setSupportDistance(pointsVo.getSupportDistance());
        collectionPoints.setShopId(pointsVo.getShopId());
        return collectionPoints;
    }


    public ModifyCollectionPointsVo(Integer id, String name, String concat, String phone, Long provinceId, String provinceName, Long cityId, String cityName, Long areaId, String areaName, String detailAddress, BigDecimal lng, BigDecimal lat, String remark, Integer doorRecovery, BigDecimal supportDistance, Integer shopId) {
        this.id = id;
        this.name = name;
        this.concat = concat;
        this.phone = phone;
        this.provinceId = provinceId;
        this.provinceName = provinceName;
        this.cityId = cityId;
        this.cityName = cityName;
        this.areaId = areaId;
        this.areaName = areaName;
        this.detailAddress = detailAddress;
        this.lng = lng;
        this.lat = lat;
        this.remark = remark;
        this.doorRecovery = doorRecovery;
        this.supportDistance = supportDistance;
        this.shopId = shopId;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public ModifyCollectionPointsVo() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getConcat() {
        return concat;
    }

    public void setConcat(String concat) {
        this.concat = concat;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public BigDecimal getLng() {
        return lng;
    }

    public void setLng(BigDecimal lng) {
        this.lng = lng;
    }

    public BigDecimal getLat() {
        return lat;
    }

    public void setLat(BigDecimal lat) {
        this.lat = lat;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getDoorRecovery() {
        return doorRecovery;
    }

    public void setDoorRecovery(Integer doorRecovery) {
        this.doorRecovery = doorRecovery;
    }

    public BigDecimal getSupportDistance() {
        return supportDistance;
    }

    public void setSupportDistance(BigDecimal supportDistance) {
        this.supportDistance = supportDistance;
    }
}
